<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt" %>

<!DOCTYPE html>
<html>
<head>
	<title></title>

	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- 引入bootstrap -->
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.min.css">
	<!-- 引入JQuery  bootstrap.js-->
	<script src="${pageContext.request.contextPath}/js/jquery-3.2.1.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
</head>
<body>
<!-- 顶栏 -->
<jsp:include page="top.jsp"></jsp:include>
<!-- 中间主体 -->
<div class="container" id="content">
	<div class="row">
		<jsp:include page="menu.jsp"></jsp:include>
		<div class="col-md-10">
			<div class="panel panel-default">
				<div class="panel-heading">
					<div class="row">
						<h1 style="text-align: center;">查看教师信息</h1>
					</div>
				</div>
				<div class="panel-body">
					<form class="form-horizontal" role="form" action="${pageContext.request.contextPath}/admin/editTeachered.html" id="editfrom" method="post">
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label">工号</label>
							<div class="col-sm-10">
								<input readonly="readonly" type="number" class="form-control" id="inputEmail3" name="userid" placeholder="请输入工号" value="${list[0].teacherID}">
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-2 control-label">姓名</label>
							<div class="col-sm-10">
								<input readonly="readonly" type="text" class="form-control" id="inputPassword3" name="username" placeholder="请输入姓名" value="${list[0].teachername}">
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-2 control-label">性别</label>
							<div class="col-sm-10">
								<div class="col-sm-10">
									<input readonly="readonly" type="text" class="form-control"  name="username"  value="${list[0].sex}">
								</div>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-2 control-label" name="title" >职称：</label>
							<div class="col-sm-10">
								<input readonly="readonly" type="text" class="form-control"  name="username" value="${list[0].title}">
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-2 control-label" name="grade">入职时间</label>
							<div class="col-sm-10">
								<input  readonly="readonly" type="date" value="${list[0].grade}" name="grade"/>
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-2 control-label" name="collegename">所属院系</label>
							<div class="col-sm-10">
								<input readonly="readonly" type="text" value="${list[0].collegeName}"/>
							</div>
						</div>
					</form>
				</div>

			</div>

		</div>
	</div>
</div>
<div class="container" id="footer">
	<div class="row">
		<div class="col-md-12"></div>
	</div>
</div>
</body>
<script type="text/javascript">

	var collegeSelect = $("#college option");
	for (var i=0; i<collegeSelect.length; i++) {
		if (collegeSelect[i].value == '${teacher.collegeid}') {
			collegeSelect[i].selected = true;
		}
	}

	var degreeSelect = $("#degree option");
	var titleSelect = $("#title option");

	for (var i=0; i<degreeSelect.length; i++) {
		if (degreeSelect[i].value == '${teacher.degree}') {
			degreeSelect[i].selected = true;
		}
	}
	for (var i=0; i<titleSelect.length; i++) {
		if (titleSelect[i].value == '${teacher.title}') {
			titleSelect[i].selected = true;
		}
	}

</script>
</html>
